package com.baizhi.wd.view;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.baizhi.wd.entity.Person;

public class QueryPersonDetailView extends HttpServlet {
	public void service(HttpServletRequest request,HttpServletResponse response) throws IOException{
			//设置响应类型
			response.setContentType("text/html");
			response.setCharacterEncoding("utf-8");
		
			//获取输出流
			PrintWriter out = response.getWriter();
			Object obj = request.getAttribute("Person");
			Person person = (Person)obj;
			//使用输出流
			out.println("<html>");
			out.println("<title>查一个详细信息</title>");
			out.println("<body>");
			out.println("姓名:"+person.getName()+"<br/>");
			out.println("手机:"+person.getMobile()+"<br/>");
			out.println("座机:"+person.getTelphone()+"<br/>");
			out.println("邮箱:"+person.getEmail()+"<br/>");
			out.println("城市:"+person.getCity()+"<br/>");
			out.println("生日:"+person.getBirthday()+"<br/>");
			out.println("<a href='/telbook_2/per/queryAllAction'>返回查所有</a>"); 
			out.println("</body>");
			out.println("</html>");
	
	}	
}
